package com.nulldev.util.osAPI.hardware.gpu;

public enum Brand {
	/*
	 * NVIDIA
	 */
	GEFORCE_RTX("GeForce RTX"),
	GEFORCE_GTX("GeForce GTX"),
	GEFORCE("GeForce"),
	GEFORCE_OLD("GeForce (pre-GT)"),
	TESLA("Tesla"),
	/*
	 * AMD
	 */
	RADEON_RX("Radeon RX"),
	RADEON_RX_VEGA("Radeon RX Vega"),
	AMD_R9("AMD Radeon R9"),
	AMD_R7("AMD Radeon R7"),
	AMD_R5("AMD Radeon R5"),
	AMD_R3("AMD Radeon R3"),
	AMD_HD_8XXX("AMD Radeon HD 8xxx"),
	AMD_HD_7XXX("AMD Radeon HD 7xxx"),
	AMD_HD_6XXX("AMD Radeon HD 6xxx"),
	AMD_HD_5XXX("AMD Radeon HD 5xxx"),
	AMD_HD_4XXX("AMD Radeon HD 4xxx"),
	AMD_HD_3XXX("AMD Radeon HD 3xxx"),
	AMD_HD_2XXX("AMD Radeon HD 2xxx"),
	AMD_HD_1XXX("AMD Radeon XT 1xxx"),
	AMD_XT("AMD Radeon XT"),
	/*
	 * Intel
	 */
	INTEL_UHD("Intel UHD Graphics"),
	INTEL_HD("Intel HD Graphics"),
	INTEL_HD_6XX("Intel HD Graphics (6XX)"),
	INTEL_HD_5XX("Intel HD Graphics (5XX)"),
	INTEL_HD_4XX("Intel HD Graphics (4XX)"),
	INTEL_HD_5XXX("Intel HD Graphics (5XXX)"),
	INTEL_HD_4XXX("Intel HD Graphics (4XXX)"),
	INTEL_HD_3XXX("Intel HD Graphics (3XXX)"),
	INTEL_HD_2XXX("Intel HD Graphics (2XXX)"),

	/*
	 * Others
	 */
	UNKNOWN("Unknown");

	private String displayName;

	private Brand(final String displayName) {
		this.displayName = displayName;
	}

	@Override
	public String toString() {
		return this.displayName;
	}

	public String displayName() {
		return this.displayName;
	}

	public String displaySeries(final char series) {
		return this.displayName + " " + series + "xx Series";
	}

	public static Brand byName(final String name) {
		for (final Brand br : values()) {
			if (br.name().equals(name)) {
				return br;
			}
		}
		return UNKNOWN;
	}
}
